package com.bracketbird.client.gui.club.tournament.rtc;


import com.bracketbird.client.model.*;
import com.bracketbird.client.service.rtc.*;

/**
 *
 */
public class AddTeamEventHandler extends RTCClientEventHandler{
    private PlayingTeam team;

    protected AddTeamEventHandler(boolean fromClient, PlayingTeam pt) {
        super(fromClient);
        this.team = pt;
    }


    @Override
    protected boolean shouldWarn() {
        return false;
    }

    @Override
    protected String getWarning() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }


    protected RTCEvent createEventToServer(){
        return RTCEventFac.createAddTeamEvent(team);

    }
    protected void updateTournament(){
        RTC.getInstance().getTournament().addTeam(team, fromClient);
    }


}
